<!-- $Header: /cvsroot/autodoc/autodoc/html.tmpl,v 1.4 2006/05/16 19:01:27 rbt Exp $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
  <head>
    <title>Index for ledgersmb</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">
	BODY {
		color:	#000000;
		background-color: #FFFFFF;
		font-family: Helvetica, sans-serif;
	}

	P {
		margin-top: 5px;
		margin-bottom: 5px;
	}

	P.w3ref {
		font-size: 8pt;
		font-style: italic;
		text-align: right;
	}

	P.detail {
		font-size: 10pt;
	}

	.error {
		color: #FFFFFF;
		background-color: #FF0000;
	}

	H1, H2, H3, H4, H5, H6 {
	}

	OL {
		list-style-type: upper-alpha;
	}

	UL.topic {
		list-style-type: upper-alpha;
	}

	LI.topic {
		font-weight : bold;
	}

	HR {
		color: #00FF00;
		background-color: #808080;
	}

	TABLE {
		border-width: medium;
		padding: 3px;
		background-color: #000000;
		width: 90%;
	}

	CAPTION {
		text-transform: capitalize;
		font-weight : bold;
		font-size: 14pt;
	}

	TH {
		color: #FFFFFF;
		background-color: #000000;
		text-align: left;
	}

	TR {
		color: #000000;
		background-color: #000000;
		vertical-align: top;
	}

	TR.tr0 {
		background-color: #F0F0F0;
	}

	TR.tr1 {
		background-color: #D8D8D8;
	}

	TD {
		font-size: 12pt;
	}

	TD.col0 {
		font-weight : bold;
		width: 20%;
	}

	TD.col1 {
		font-style: italic;
		width: 15%;
	}

	TD.col2 {
		font-size: 12px;
	}
    </style>
    <link rel="stylesheet" type="text/css" media="all" href="all.css">
    <link rel="stylesheet" type="text/css" media="screen" href="screen.css">
    <link rel="stylesheet" type="text/css" media="print" href="print.css">
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  </head>
  <body>

    <!-- Primary Index -->
	<p><br><br>Dumped on 2007-03-22</p>
<h1><a name="index">Index of database - ledgersmb</a></h1>
<ul>
    
    <li><a name="public.schema">public</a></li><ul>
    	<li><a href="#public.table.acc-trans">acc_trans</a></li><li><a href="#public.table.ap">ap</a></li><li><a href="#public.table.ar">ar</a></li><li><a href="#public.table.assembly">assembly</a></li><li><a href="#public.table.audittrail">audittrail</a></li><li><a href="#public.table.business">business</a></li><li><a href="#public.table.chart">chart</a></li><li><a href="#public.table.custom-field-catalog">custom_field_catalog</a></li><li><a href="#public.table.custom-table-catalog">custom_table_catalog</a></li><li><a href="#public.table.customer">customer</a></li><li><a href="#public.table.customertax">customertax</a></li><li><a href="#public.table.defaults">defaults</a></li><li><a href="#public.table.department">department</a></li><li><a href="#public.table.dpt-trans">dpt_trans</a></li><li><a href="#public.table.employee">employee</a></li><li><a href="#public.table.exchangerate">exchangerate</a></li><li><a href="#public.table.gifi">gifi</a></li><li><a href="#public.table.gl">gl</a></li><li><a href="#public.table.inventory">inventory</a></li><li><a href="#public.table.invoice">invoice</a></li><li><a href="#public.table.jcitems">jcitems</a></li><li><a href="#public.table.language">language</a></li><li><a href="#public.table.makemodel">makemodel</a></li><li><a href="#public.table.oe">oe</a></li><li><a href="#public.table.orderitems">orderitems</a></li><li><a href="#public.table.parts">parts</a></li><li><a href="#public.table.partscustomer">partscustomer</a></li><li><a href="#public.table.partsgroup">partsgroup</a></li><li><a href="#public.table.partstax">partstax</a></li><li><a href="#public.table.partsvendor">partsvendor</a></li><li><a href="#public.table.pricegroup">pricegroup</a></li><li><a href="#public.table.project">project</a></li><li><a href="#public.table.recurring">recurring</a></li><li><a href="#public.table.recurringemail">recurringemail</a></li><li><a href="#public.table.recurringprint">recurringprint</a></li><li><a href="#public.table.shipto">shipto</a></li><li><a href="#public.table.sic">sic</a></li><li><a href="#public.table.status">status</a></li><li><a href="#public.table.tax">tax</a></li><li><a href="#public.table.taxcategory">taxcategory</a></li><li><a href="#public.table.taxmodule">taxmodule</a></li><li><a href="#public.table.transactions">transactions</a></li><li><a href="#public.table.translation">translation</a></li><li><a href="#public.table.vendor">vendor</a></li><li><a href="#public.table.vendortax">vendortax</a></li><li><a href="#public.table.warehouse">warehouse</a></li><li><a href="#public.table.yearend">yearend</a></li>
  	<li><a href="#public.function.add-custom-field-character-varying-character-varying-character-varying">add_custom_field( character varying, character varying, character varying )</a></li><li><a href="#public.function.avgcost-integer">avgcost( integer )</a></li><li><a href="#public.function.check-department">check_department(  )</a></li><li><a href="#public.function.check-inventory">check_inventory(  )</a></li><li><a href="#public.function.del-customer">del_customer(  )</a></li><li><a href="#public.function.del-department">del_department(  )</a></li><li><a href="#public.function.del-exchangerate">del_exchangerate(  )</a></li><li><a href="#public.function.del-recurring">del_recurring(  )</a></li><li><a href="#public.function.del-vendor">del_vendor(  )</a></li><li><a href="#public.function.del-yearend">del_yearend(  )</a></li><li><a href="#public.function.drop-custom-field-character-varying-character-varying">drop_custom_field( character varying, character varying )</a></li><li><a href="#public.function.lastcost-integer">lastcost( integer )</a></li><li><a href="#public.function.trigger-parts-short">trigger_parts_short(  )</a></li><li><a href="#public.function.update-user-integer-text">update_user( integer, text )</a></li>
    </ul>
    
</ul>

    <!-- Schema Creation -->
    <!-- publicpublic -->

		
		
        <hr>
		<h2>Table:
			<a name="public.table.acc-trans">acc_trans</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>acc_trans Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                  <a href="#public.table.chart">chart.id</a>
                  
                
                </td>
            	<td>chart_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				

				NOT NULL
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>amount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>source</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>cleared</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>fx_transaction</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>project_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>memo</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>invoice_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>entry_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       acc_trans_chart_id_key chart_id
    
       acc_trans_source_key lower(source)
    
       acc_trans_trans_id_key trans_id
    
       acc_trans_transdate_key transdate
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.ap">ap</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>ap Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>invnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>vendor_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxincluded</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>amount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>netamount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>paid</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>datepaid</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>duedate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>invoice</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>ordnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>till</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>quonumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>intnotes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>department_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shipvia</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>language_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>ponumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shippingpoint</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>terms</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       ap_employee_id_key employee_id
    
       ap_id_key id
    
       ap_invnumber_key invnumber
    
       ap_ordnumber_key ordnumber
    
       ap_quonumber_key quonumber
    
       ap_transdate_key transdate
    
       ap_vendor_id_key vendor_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.ar">ar</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>ar Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>invnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>customer_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxincluded</td>
            	<td>boolean</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>amount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>netamount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>paid</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>datepaid</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>duedate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>invoice</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shippingpoint</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>terms</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>ordnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>till</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>quonumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>intnotes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>department_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shipvia</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>language_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>ponumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       ar_customer_id_key customer_id
    
       ar_employee_id_key employee_id
    
       ar_id_key id
    
       ar_invnumber_key invnumber
    
       ar_ordnumber_key ordnumber
    
       ar_quonumber_key quonumber
    
       ar_transdate_key transdate
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.assembly">assembly</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>assembly Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>qty</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>bom</td>
            	<td>boolean</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>adj</td>
            	<td>boolean</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       assembly_id_key id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.audittrail">audittrail</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>audittrail Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>tablename</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>reference</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>formname</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>action</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>timestamp without time zone</td>
                <td><i>
				

				
				DEFAULT now()
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>entry_id</td>
            	<td>bigserial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       audittrail_trans_id_key trans_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.business">business</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>business Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>discount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.chart">chart</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>chart Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>accno</td>
            	<td>text</td>
                <td><i>
				

				NOT NULL
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>charttype</td>
            	<td>character(1)</td>
                <td><i>
				

				
				DEFAULT &#39;A&#39;::bpchar
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>category</td>
            	<td>character(1)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>link</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>gifi_accno</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>contra</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		
			<p>Tables referencing this one via Foreign Key Constraints:</p>
		
			<ul>
				<li><a href="#public.table.acc-trans">acc_trans</a></li>
			</ul>
		
			<ul>
				<li><a href="#public.table.partstax">partstax</a></li>
			</ul>
		
			<ul>
				<li><a href="#public.table.tax">tax</a></li>
			</ul>
		
		

    <!-- Indexes -->
    
       chart_category_key category
    
       chart_gifi_accno_key gifi_accno
    
       chart_id_key id
    
       chart_link_key link
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.custom-field-catalog">custom_field_catalog</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>custom_field_catalog Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>field_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                  <a href="#public.table.custom-table-catalog">custom_table_catalog.table_id</a>
                  
                
                </td>
            	<td>table_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>field_name</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.custom-table-catalog">custom_table_catalog</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>custom_table_catalog Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>table_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>extends</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>table_name</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		
			<p>Tables referencing this one via Foreign Key Constraints:</p>
		
			<ul>
				<li><a href="#public.table.custom-field-catalog">custom_field_catalog</a></li>
			</ul>
		
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.customer">customer</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>customer Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>name</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>address1</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>address2</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>city</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>state</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>zipcode</td>
            	<td>character varying(10)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>country</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>contact</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>phone</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>fax</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>email</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>discount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxincluded</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>creditlimit</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>terms</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>customernumber</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>cc</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>bcc</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>business_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>taxnumber</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>sic_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>iban</td>
            	<td>character varying(34)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>bic</td>
            	<td>character varying(11)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>language_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>pricegroup_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>startdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>enddate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       customer_contact_key lower((contact)::text)
    
       customer_customernumber_key customernumber
    
       customer_id_key id
    
       customer_name_key lower((name)::text)
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.customertax">customertax</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>customertax Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>customer_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>chart_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       customer_customer_id_key customer_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.defaults">defaults</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>defaults Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>setting_key</td>
            	<td>text</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>value</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.department">department</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>department Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>role</td>
            	<td>character(1)</td>
                <td><i>
				

				
				DEFAULT &#39;P&#39;::bpchar
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       department_id_key id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.dpt-trans">dpt_trans</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>dpt_trans Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>department_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.employee">employee</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>employee Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>login</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>name</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>address1</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>address2</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>city</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>state</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>zipcode</td>
            	<td>character varying(10)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>country</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>workphone</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>homephone</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>startdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>enddate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>role</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>sales</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>email</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>ssn</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>iban</td>
            	<td>character varying(34)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>bic</td>
            	<td>character varying(11)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>managerid</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>employeenumber</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>dob</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       employee_id_key id
    
       employee_name_key lower((name)::text)
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.exchangerate">exchangerate</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>exchangerate Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>buy</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>sell</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       exchangerate_ct_key curr, transdate
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.gifi">gifi</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>gifi Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>accno</td>
            	<td>text</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.gl">gl</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>gl Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>reference</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>department_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       gl_description_key lower(description)
    
       gl_employee_id_key employee_id
    
       gl_id_key id
    
       gl_reference_key reference
    
       gl_transdate_key transdate
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.inventory">inventory</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>inventory Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>warehouse_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>orderitems_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>qty</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shippingdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>entry_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.invoice">invoice</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>invoice Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;invoiceid&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>qty</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>allocated</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>sellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>fxsellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>discount</td>
            	<td>real</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>assemblyitem</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>unit</td>
            	<td>character varying(5)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>project_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>deliverydate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>serialnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       invoice_id_key id
    
       invoice_trans_id_key trans_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.jcitems">jcitems</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>jcitems Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;jcitemsid&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>project_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>qty</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>allocated</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>sellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>fxsellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>serialnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>checkedin</td>
            	<td>timestamp with time zone</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>checkedout</td>
            	<td>timestamp with time zone</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       jcitems_id_key id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.language">language</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>language Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>code</td>
            	<td>character varying(6)</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.makemodel">makemodel</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>makemodel Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>make</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>model</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       makemodel_make_key lower(make)
    
       makemodel_model_key lower(model)
    
       makemodel_parts_id_key parts_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.oe">oe</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>oe Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>ordnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>vendor_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>customer_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>amount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>netamount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>reqdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxincluded</td>
            	<td>boolean</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shippingpoint</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>closed</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>quotation</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>quonumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>intnotes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>department_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shipvia</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>language_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>ponumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>terms</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       oe_employee_id_key employee_id
    
       oe_id_key id
    
       oe_ordnumber_key ordnumber
    
       oe_transdate_key transdate
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.orderitems">orderitems</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>orderitems Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;orderitemsid&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>qty</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>sellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>discount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>unit</td>
            	<td>character varying(5)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>project_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>reqdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>ship</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>serialnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       orderitems_id_key id
    
       orderitems_trans_id_key trans_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.parts">parts</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>parts Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>partnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>unit</td>
            	<td>character varying(5)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>listprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>sellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>lastcost</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>priceupdate</td>
            	<td>date</td>
                <td><i>
				

				
				DEFAULT (&#39;now&#39;::text)::date
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>weight</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>onhand</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>makemodel</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>assembly</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>alternate</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>rop</td>
            	<td>real</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>inventory_accno_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>income_accno_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>expense_accno_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>bin</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>obsolete</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>bom</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>image</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>drawing</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>microfiche</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>partsgroup_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>project_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>avgcost</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		
			<p>Tables referencing this one via Foreign Key Constraints:</p>
		
			<ul>
				<li><a href="#public.table.partstax">partstax</a></li>
			</ul>
		
		

    <!-- Indexes -->
    
       parts_description_key lower(description)
    
       parts_id_key id
    
       parts_partnumber_key lower(partnumber)
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.partscustomer">partscustomer</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>partscustomer Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>customer_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>pricegroup_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>pricebreak</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>sellprice</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>validfrom</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>validto</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>entry_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.partsgroup">partsgroup</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>partsgroup Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>partsgroup</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       partsgroup_id_key id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.partstax">partstax</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>partstax Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                  <a href="#public.table.parts">parts.id</a>
                  
                
                  
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                  <a href="#public.table.chart">chart.id</a>
                  
                
                  
                
                </td>
            	<td>chart_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                  
                  <a href="#public.table.taxcategory">taxcategory.taxcategory_id</a>
                  
                
                </td>
            	<td>taxcategory_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       partstax_parts_id_key parts_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.partsvendor">partsvendor</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>partsvendor Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>vendor_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>partnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>leadtime</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>lastcost</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>entry_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       partsvendor_parts_id_key parts_id
    
       partsvendor_vendor_id_key vendor_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.pricegroup">pricegroup</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>pricegroup Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>pricegroup</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       pricegroup_id_key id
    
       pricegroup_pricegroup_key pricegroup
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.project">project</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>project Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>projectnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>startdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>enddate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>parts_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>production</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>completed</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>customer_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       project_id_key id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.recurring">recurring</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>recurring Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>reference</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>startdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>nextdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>enddate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>repeat</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>unit</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>howmany</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>payment</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.recurringemail">recurringemail</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>recurringemail Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>formname</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>format</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>message</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.recurringprint">recurringprint</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>recurringprint Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>formname</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>format</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>printer</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.shipto">shipto</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>shipto Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shiptoname</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shiptoaddress1</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shiptoaddress2</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shiptocity</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shiptostate</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shiptozipcode</td>
            	<td>character varying(10)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shiptocountry</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shiptocontact</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shiptophone</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>shiptofax</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>shiptoemail</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>entry_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       shipto_trans_id_key trans_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.sic">sic</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>sic Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>code</td>
            	<td>character varying(6)</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>sictype</td>
            	<td>character(1)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.status">status</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>status Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>formname</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>printed</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>emailed</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>spoolfile</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       status_trans_id_key trans_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.tax">tax</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>tax Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                  <a href="#public.table.chart">chart.id</a>
                  
                
                  
                
                </td>
            	<td>chart_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>rate</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxnumber</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>validto</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>pass</td>
            	<td>integer</td>
                <td><i>
				

				NOT NULL
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                  <a href="#public.table.taxmodule">taxmodule.taxmodule_id</a>
                  
                
                </td>
            	<td>taxmodule_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				

				NOT NULL
				DEFAULT 1
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.taxcategory">taxcategory</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>taxcategory Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>taxcategory_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>taxcategoryname</td>
            	<td>text</td>
                <td><i>
				

				NOT NULL
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                  
                  <a href="#public.table.taxmodule">taxmodule.taxmodule_id</a>
                  
                
                </td>
            	<td>taxmodule_id</td>
            	<td>integer</td>
                <td><i>
				
					

					
				

				NOT NULL
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		
			<p>Tables referencing this one via Foreign Key Constraints:</p>
		
			<ul>
				<li><a href="#public.table.partstax">partstax</a></li>
			</ul>
		
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.taxmodule">taxmodule</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>taxmodule Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>taxmodule_id</td>
            	<td>serial</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>taxmodulename</td>
            	<td>text</td>
                <td><i>
				

				NOT NULL
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		
			<p>Tables referencing this one via Foreign Key Constraints:</p>
		
			<ul>
				<li><a href="#public.table.tax">tax</a></li>
			</ul>
		
			<ul>
				<li><a href="#public.table.taxcategory">taxcategory</a></li>
			</ul>
		
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.transactions">transactions</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>transactions Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>table_name</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.translation">translation</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>translation Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>language_code</td>
            	<td>character varying(6)</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       translation_trans_id_key trans_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.vendor">vendor</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>vendor Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>name</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>address1</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>address2</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>city</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>state</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>zipcode</td>
            	<td>character varying(10)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>country</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>contact</td>
            	<td>character varying(64)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>phone</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>fax</td>
            	<td>character varying(20)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>email</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>notes</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>terms</td>
            	<td>smallint</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxincluded</td>
            	<td>boolean</td>
                <td><i>
				

				
				DEFAULT false
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>vendornumber</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>cc</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>bcc</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>gifi_accno</td>
            	<td>character varying(30)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>business_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>taxnumber</td>
            	<td>character varying(32)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>sic_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>discount</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>creditlimit</td>
            	<td>numeric</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>iban</td>
            	<td>character varying(34)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>bic</td>
            	<td>character varying(11)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>employee_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>language_code</td>
            	<td>character varying(6)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>pricegroup_id</td>
            	<td>integer</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>curr</td>
            	<td>character(3)</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr0">
				<td>
                
                </td>
            	<td>startdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>enddate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       vendor_contact_key lower((contact)::text)
    
       vendor_id_key id
    
       vendor_name_key lower((name)::text)
    
       vendor_vendornumber_key vendornumber
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.vendortax">vendortax</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>vendortax Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>vendor_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                  
                
                </td>
            	<td>chart_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    
       vendortax_vendor_id_key vendor_id
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.warehouse">warehouse</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>warehouse Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				DEFAULT nextval(&#39;id&#39;::regclass)
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>description</td>
            	<td>text</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	
        <hr>
		<h2>Table:
			<a name="public.table.yearend">yearend</a>
		</h2>
        


        <table width="100%" cellspacing="0" cellpadding="3">
                <caption>yearend Structure</caption>
                <tr>
                <th>F-Key</th>
                <th>Name</th>
                <th>Type</th>
                <th>Description</th>
                </tr>
            
            <tr class="tr0">
				<td>
                
                  
                
                </td>
            	<td>trans_id</td>
            	<td>integer</td>
                <td><i>
				
					PRIMARY KEY
					

					
				

				
				
				</i>
				
				</td>
			 </tr>
            
            <tr class="tr1">
				<td>
                
                </td>
            	<td>transdate</td>
            	<td>date</td>
                <td><i>
				

				
				
				</i>
				
				</td>
			 </tr>
            
        </table>

        <!-- Inherits -->
		

		
		
		

        <!-- Constraint List -->
		

        <!-- Foreign Key Discovery -->
		

    <!-- Indexes -->
    

	<!-- View Definition -->
	

	<!-- List off permissions -->
	

	<p>
		<a href="#index">Index</a> -
		<a href="#public.schema">Schema public</a>
    </p>
	

	<!-- We've gone through the table structure, now lets take a look at user functions -->
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.add-custom-field-character-varying-character-varying-character-varying">add_custom_field( character varying, character varying, character varying )</a>
		</h2>
<h3>Returns: boolean</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
DECLARE
table_name ALIAS FOR $1;
new_field_name ALIAS FOR $2;
field_datatype ALIAS FOR $3;

BEGIN
	EXECUTE &#39;SELECT TABLE_ID FROM custom_table_catalog 
		WHERE extends = &#39;&#39;&#39; || table_name || &#39;&#39;&#39; &#39;;
	IF NOT FOUND THEN
		BEGIN
			INSERT INTO custom_table_catalog (extends) 
				VALUES (table_name);
			EXECUTE &#39;CREATE TABLE custom_&#39;||table_name || 
				&#39; (row_id INT PRIMARY KEY)&#39;;
		EXCEPTION WHEN duplicate_table THEN
			-- do nothing
		END;
	END IF;
	EXECUTE &#39;INSERT INTO custom_field_catalog (field_name, table_id)
	VALUES ( &#39;&#39;&#39; || new_field_name ||&#39;&#39;&#39;, (SELECT table_id FROM custom_table_catalog
		WHERE extends = &#39;&#39;&#39;|| table_name || &#39;&#39;&#39;))&#39;;
	EXECUTE &#39;ALTER TABLE custom_&#39;||table_name || &#39; ADD COLUMN &#39; 
		|| new_field_name || &#39; &#39; || field_datatype;
	RETURN TRUE;
END;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.avgcost-integer">avgcost( integer )</a>
		</h2>
<h3>Returns: double precision</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>

DECLARE

v_cost float;
v_qty float;
v_parts_id alias for $1;

BEGIN

  SELECT INTO v_cost, v_qty SUM(i.sellprice * i.qty), SUM(i.qty)
  FROM invoice i
  JOIN ap a ON (a.id = i.trans_id)
  WHERE i.parts_id = v_parts_id;
  
  IF v_cost IS NULL THEN
    v_cost := 0;
  END IF;

  IF NOT v_qty IS NULL THEN
    IF v_qty = 0 THEN
      v_cost := 0;
    ELSE
      v_cost := v_cost/v_qty;
    END IF;
  END IF;

RETURN v_cost;
END;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.check-department">check_department(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>

declare
  dpt_id int;

begin
 
  if new.department_id = 0 then
    delete from dpt_trans where trans_id = new.id;
    return NULL;
  end if;

  select into dpt_id trans_id from dpt_trans where trans_id = new.id;
  
  if dpt_id &gt; 0 then
    update dpt_trans set department_id = new.department_id where trans_id = dpt_id;
  else
    insert into dpt_trans (trans_id, department_id) values (new.id, new.department_id);
  end if;
return NULL;

end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.check-inventory">check_inventory(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>

declare
  itemid int;
  row_data inventory%rowtype;

begin

  if not old.quotation then
    for row_data in select * from inventory where trans_id = old.id loop
      select into itemid id from orderitems where trans_id = old.id and id = row_data.orderitems_id;

      if itemid is null then
	delete from inventory where trans_id = old.id and orderitems_id = row_data.orderitems_id;
      end if;
    end loop;
  end if;
return old;
end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.del-customer">del_customer(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
begin
  delete from shipto where trans_id = old.id;
  delete from customertax where customer_id = old.id;
  delete from partscustomer where customer_id = old.id;
  return NULL;
end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.del-department">del_department(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
begin
  delete from dpt_trans where trans_id = old.id;
  return NULL;
end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.del-exchangerate">del_exchangerate(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>

declare
  t_transdate date;
  t_curr char(3);
  t_id int;
  d_curr text;

begin

  select into d_curr substr(value,1,3) from defaults where setting_key = &#39;curr&#39;;
  
  if TG_RELNAME = &#39;ar&#39; then
    select into t_curr, t_transdate curr, transdate from ar where id = old.id;
  end if;
  if TG_RELNAME = &#39;ap&#39; then
    select into t_curr, t_transdate curr, transdate from ap where id = old.id;
  end if;
  if TG_RELNAME = &#39;oe&#39; then
    select into t_curr, t_transdate curr, transdate from oe where id = old.id;
  end if;

  if d_curr != t_curr then

    select into t_id a.id from acc_trans ac
    join ar a on (a.id = ac.trans_id)
    where a.curr = t_curr
    and ac.transdate = t_transdate

    except select a.id from ar a where a.id = old.id
    
    union
    
    select a.id from acc_trans ac
    join ap a on (a.id = ac.trans_id)
    where a.curr = t_curr
    and ac.transdate = t_transdate
    
    except select a.id from ap a where a.id = old.id
    
    union
    
    select o.id from oe o
    where o.curr = t_curr
    and o.transdate = t_transdate
    
    except select o.id from oe o where o.id = old.id;

    if not found then
      delete from exchangerate where curr = t_curr and transdate = t_transdate;
    end if;
  end if;
return old;

end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.del-recurring">del_recurring(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
BEGIN
  DELETE FROM recurring WHERE id = old.id;
  DELETE FROM recurringemail WHERE id = old.id;
  DELETE FROM recurringprint WHERE id = old.id;
  RETURN NULL;
END;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.del-vendor">del_vendor(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
begin
  delete from shipto where trans_id = old.id;
  delete from vendortax where vendor_id = old.id;
  delete from partsvendor where vendor_id = old.id;
  return NULL;
end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.del-yearend">del_yearend(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
begin
  delete from yearend where trans_id = old.id;
  return NULL;
end;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.drop-custom-field-character-varying-character-varying">drop_custom_field( character varying, character varying )</a>
		</h2>
<h3>Returns: boolean</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
DECLARE
table_name ALIAS FOR $1;
custom_field_name ALIAS FOR $2;
BEGIN
	DELETE FROM custom_field_catalog 
	WHERE field_name = custom_field_name AND 
		table_id = (SELECT table_id FROM custom_table_catalog 
			WHERE extends = table_name);
	EXECUTE &#39;ALTER TABLE custom_&#39; || table_name || 
		&#39; DROP COLUMN &#39; || custom_field_name;
	RETURN TRUE;	
END;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.lastcost-integer">lastcost( integer )</a>
		</h2>
<h3>Returns: double precision</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>

DECLARE

v_cost float;
v_parts_id alias for $1;

BEGIN

  SELECT INTO v_cost sellprice FROM invoice i
  JOIN ap a ON (a.id = i.trans_id)
  WHERE i.parts_id = v_parts_id
  ORDER BY a.transdate desc, a.id desc
  LIMIT 1;

  IF v_cost IS NULL THEN
    v_cost := 0;
  END IF;

RETURN v_cost;
END;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.trigger-parts-short">trigger_parts_short(  )</a>
		</h2>
<h3>Returns: &quot;trigger&quot;</h3>
<h3>Language: PLPGSQL</h3>
        
        <pre>
BEGIN
  IF NEW.onhand &gt;= NEW.rop THEN
    NOTIFY parts_short;
  END IF;
  RETURN NEW;
END;
</pre>
	
		<hr>
		<h2>Function:
			<a href="#public.schema"><a name="public.function.update-user-integer-text">update_user( integer, text )</a>
		</h2>
<h3>Returns: integer</h3>
<h3>Language: SQL</h3>
        <p> Takes int4 which is users.id and text which is username. Will update username based on id. Username is unique </p>
        <pre>
   UPDATE users SET username = &#39;$2&#39; WHERE id = $1;
   SELECT 1;
   </pre>
	


<p class="w3ref">Generated by <a href="http://www.rbt.ca/autodoc/">PostgreSQL Autodoc</a></p>
<p class="w3ref"><a href="http://validator.w3.org/check/referer">W3C HTML 4.01 Strict</a></p>
</body></html>
